﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Admin.CheckupForm
{
    public partial class PrintXY : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Params["CheckupFormId"] != null && Request.Params["CheckupFormId"].Trim() != "")
            {
                int checkupFormId = ChinaSoft.Common.Input.SetInt(Request.Params["CheckupFormId"]);
                BindInfo(checkupFormId);
            }
        }
        private void BindInfo(int checkupFormId)
        {
            ChinaSoft.BLL.Common.Bind bllBind = new ChinaSoft.BLL.Common.Bind();
            System.Data.DataSet ds = bllBind.GetDataSet("*", "V_CheckupFormList", "CheckupFormId=" + checkupFormId);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                System.Data.DataRow dr = ds.Tables[0].Rows[0];
                lbDepartment.Text = labZbbm.Text= dr["DepartMent"].ToString();
                lbPrinter.Text = dr["UserName"].ToString();
                lbDate.Text = Convert.ToDateTime(dr["CreateTime"].ToString()).ToShortDateString();
                lbNo.Text = dr["CheckupFormId"].ToString();
                labXmmc.Text = dr["ProjectName"].ToString();
                labXmbh.Text = dr["ProjectNumber"].ToString();
                labZyshlr.Text = dr["CheckupContent"].ToString();
                labXmgk.Text = dr["Description"].ToString();
                labXmyz.Text = dr["Customer"].ToString();
                labRwyj.Text = dr["Property"].ToString();
            }
        }
    }
}